<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>所有演唱会</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f9;
            color: #333;
            margin: 0;
            padding: 20px;
        }

        h2 {
            color: #28a745;
            text-align: center;
            margin-bottom: 20px;
        }

        ul {
            list-style-type: none;
            padding: 0;
        }

        ul li {
            background-color: #fff;
            margin: 10px 0;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        ul li strong {
            font-size: 1.2em;
            color: #007bff;
        }

        ul li p {
            margin: 8px 0;
            color: #555;
        }

        form {
            margin-top: 10px;
        }

        button[type="submit"] {
            background-color: #28a745;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        button[type="submit"]:hover {
            background-color: #218838;
        }

        p {
            text-align: center;
            color: #777;
        }
    </style>

</head>
<body>
<h2>所有演唱会</h2>

<!-- 演唱会列表 -->
{% if concerts %}
<ul>
    {% for concert in concerts %}
    <li>
        <strong>{{ concert[0] }}</strong><br>
        时间：{{ concert[1] }}<br>
        地点：{{ concert[2] }}<br>
        <!-- 参加按钮 -->
        <form method="POST" action="{{ url_for('add_concert') }}">
            <input type="hidden" name="concert_name" value="{{ concert[0] }}">
            <button type="submit">参加</button>
        </form>
    </li>
    {% endfor %}
</ul>
{% else %}
<p>暂无演唱会信息。</p>
{% endif %}

</body>
</html>


